package com.sp.scmdb.entity;

import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.sp.scmdb.common.DomainObject;

@Entity
@Table(name = "OBJ_EMPLOYEE")
public class Employee extends DomainObject {

	/** 人员名 */
	@Column(name = "empName")
	private String empName;

	/** 卡号 */
	@Column(name = "empLabelID")
	private String empLableID;

	/** 工号 */
	@Column(name = "empWorkID")
	private String empWorkID;

	/** 部门ID */
	@Column(name = "empDepID")
	private String empDepID;
	
	/** 新部门ID */
	@Column(name = "empBuMenID")
	private String empBuMenID;

	/** 工种 */
	@Column(name = "empWorkTypeID")
	private String empWorkTypeID;

	/** 职务ID */
	@Column(name = "empDutyID")
	private String empDutyID;

	/** 职称 */
	@Column(name = "empTitleID")
	private String empTitleID;
	
	/** 每日安全讲评 */
	@Column(name = "safetys")
	private String safetys;

	/** 性别 */
	@Column(name = "empSex")
	private String empSex;

	/** 血型 */
	@Column(name = "blood")
	private String blood;
	/** 住址 */
	@Column(name = "empAddr")
	private String empAddr;

	/** 照片 */
	@Column(name = "empPhoto")
	public byte[] empPhoto;

	/** 电话 */
	@Column(name = "empPhone")
	private String empPhone;
	
	/** 身份证号 */
	@Column(name = "identityNo")
	private String identityNo;

	/** 工时 */
	@Column(name = "empWorkTime")
	private String empWorkTime;

	/** 最大工时 */
	@Column(name = "empMaxWorkTime")
	private String empMaxWorkTime;

	/** 班次 */
	@Column(name = "empShiftID")
	private String empShiftID;

	/** 备注 */
	@Column(name = "rmk")
	private String rmk;

	/** 是否特种人员 */
	@Column(name = "empType")
	private String empType;
	
	/** 能进入的限制区域ID */
	@Column(name="reID")
	private String reID;
	
	/** 工程名称 */
	@Column(name="proName")
	private String proName;
	
	/** 工程编号 */
	@Column(name="proID")
	private String proID;
	
	/** 单位 */
	@Column(name="unitName")
	private String unitName;
	
	/** 工作日期 */
	@Column(name="entryTime")
	private String entryTime;
	
	/** 体检 */
	@Column(name="spection")
	private String spection;
	
	/** 合同 */
	@Column(name="contract")
	private String contract;
	
	/** 日期 */
	@Column(name="contractTime")
	private String contractTime;
	
	/** 证书 */
	@Column(name="certificate")
	private String certificate;
	
	/** 证书名称 */
	@Column(name="certificateName")
	private String certificateName;
	
	/** 城镇保险 */
	@Column(name="townSecure")
	private String townSecure;
	  
	/** 违章次数 */
	@Column(name="peccancys")
	private String peccancys;
	
	/** 其他保险 */
	@Column(name="otherSecure")
	private String otherSecure;
	
	/** 安全教育卡 */
	@Column(name="safeCard")
	private String safeCard;
	
	/** 日期 */
	@Column(name="cardTime")
	private String cardTime;
	
	/** 安全上岗 */
	@Column(name="safePosts")
	private String safePosts;
	
	/** 日期 */
	@Column(name="postsTime")
	private String postsTime;
	
	/** 劳保 */
	@Column(name="trckle")
	private String track;
	
	/** 日期 */
	@Column(name="trackTime")
	private String trackTime;
	
	/** 安全操作 */
	@Column(name="safeOption")
	private String safeOption;
	
	/** 日期 */
	@Column(name="safeOptionTime")
	private String safeOptionTime;
	
	/** 承诺书 */
	@Column(name="orderBook")
	private String orderBook;
	
	/** 承诺书日期 */
	@Column(name="orderTime")
	private String orderTime;

	/** 部门 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empDepID", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private Department depart;
	
	/** 部门 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empBuMenID", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private BuMen bumen;

	/** 工种 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empWorkTypeID", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private WorkType workType;

	/** 职务 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empDutyID", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private Duty duty;

	/** 职称 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empTitleID", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private Title title;

	/** 工时 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empWorkTime", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private WorkTime workTime;

	/** 班制 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empShiftID", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private Shifts shifts;

	/** 最大工时 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empMaxWorkTime", insertable = false, updatable = false)
	@NotFound(action=NotFoundAction.IGNORE) 
	private WorkTime maxWorkTime;

	/** 人员区域 */
	@OneToMany(mappedBy = "idEmp", fetch = FetchType.LAZY)
	private Set<RelEmpArea> relEmpAreaList;

	public BuMen getBumen() {
		return bumen;
	}

	public void setBumen(BuMen bumen) {
		this.bumen = bumen;
	}

	public String getEmpName() {
		return empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public String getEmpLableID() {
		return empLableID;
	}

	public void setEmpLableID(String empLableID) {
		this.empLableID = empLableID;
	}

	public String getEmpWorkID() {
		return empWorkID;
	}

	public void setEmpWorkID(String empWorkID) {
		this.empWorkID = empWorkID;
	}

	public String getSafetys() {
		return safetys;
	}

	public void setSafetys(String safetys) {
		this.safetys = safetys;
	}

	public String getEmpDepID() {
		return empDepID;
	}

	public void setEmpDepID(String empDepID) {
		this.empDepID = empDepID;
	}

	public String getEmpDutyID() {
		return empDutyID;
	}

	public void setEmpDutyID(String empDutyID) {
		this.empDutyID = empDutyID;
	}

	public String getEmpTitleID() {
		return empTitleID;
	}

	public void setEmpTitleID(String empTitleID) {
		this.empTitleID = empTitleID;
	}

	public String getEmpSex() {
		return empSex;
	}

	public void setEmpSex(String empSex) {
		this.empSex = empSex;
	}

	public String getEmpAddr() {
		return empAddr;
	}

	public void setEmpAddr(String empAddr) {
		this.empAddr = empAddr;
	}

	public byte[] getEmpPhoto() {
		return empPhoto;
	}

	public void setEmpPhoto(byte[] empPhoto) {
		this.empPhoto = empPhoto;
	}

	public String getEmpWorkTime() {
		return empWorkTime;
	}

	public void setEmpWorkTime(String empWorkTime) {
		this.empWorkTime = empWorkTime;
	}

	public String getEmpPhone() {
		return empPhone;
	}

	public void setEmpPhone(String empPhone) {
		this.empPhone = empPhone;
	}

	public String getRmk() {
		return rmk;
	}

	public void setRmk(String rmk) {
		this.rmk = rmk;
	}

	public Department getDepart() {
		return depart;
	}

	public void setDepart(Department depart) {
		this.depart = depart;
	}

	public Duty getDuty() {
		return duty;
	}

	public void setDuty(Duty duty) {
		this.duty = duty;
	}

	public Title getTitle() {
		return title;
	}

	public void setTitle(Title title) {
		this.title = title;
	}

	public WorkTime getWorkTime() {
		return workTime;
	}

	public void setWorkTime(WorkTime workTime) {
		this.workTime = workTime;
	}

	public String getEmpType() {
		return empType;
	}

	public void setEmpType(String empType) {
		this.empType = empType;
	}

	public Set<RelEmpArea> getRelEmpAreaList() {
		return relEmpAreaList;
	}

	public void setRelEmpAreaList(Set<RelEmpArea> relEmpAreaList) {
		this.relEmpAreaList = relEmpAreaList;
	}

	public String getEmpShiftID() {
		return empShiftID;
	}

	public void setEmpShiftID(String empShiftID) {
		this.empShiftID = empShiftID;
	}

	public String getEmpWorkTypeID() {
		return empWorkTypeID;
	}

	public void setEmpWorkTypeID(String empWorkTypeID) {
		this.empWorkTypeID = empWorkTypeID;
	}

	public WorkType getWorkType() {
		return workType;
	}

	public void setWorkType(WorkType workType) {
		this.workType = workType;
	}

	public String getEmpMaxWorkTime() {
		return empMaxWorkTime;
	}

	public void setEmpMaxWorkTime(String empMaxWorkTime) {
		this.empMaxWorkTime = empMaxWorkTime;
	}

	public WorkTime getMaxWorkTime() {
		return maxWorkTime;
	}

	public void setMaxWorkTime(WorkTime maxWorkTime) {
		this.maxWorkTime = maxWorkTime;
	}

	public Shifts getShifts() {
		return shifts;
	}

	public void setShifts(Shifts shifts) {
		this.shifts = shifts;
	}

	public String getIdentityNo() {
		return identityNo;
	}

	public void setIdentityNo(String identityNo) {
		this.identityNo = identityNo;
	}
	
	public String getReID() {
		return reID;
	}

	public void setReID(String reID) {
		this.reID = reID;
	}
	
	public String getProName() {
		return proName;
	}

	public void setProName(String proName) {
		this.proName = proName;
	}

	public String getProID() {
		return proID;
	}

	public void setProID(String proID) {
		this.proID = proID;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getEntryTime() {
		return entryTime;
	}

	public void setEntryTime(String entryTime) {
		this.entryTime = entryTime;
	}

	public String getSpection() {
		return spection;
	}

	public void setSpection(String spection) {
		this.spection = spection;
	}

	public String getContract() {
		return contract;
	}

	public void setContract(String contract) {
		this.contract = contract;
	}

	public String getContractTime() {
		return contractTime;
	}

	public void setContractTime(String contractTime) {
		this.contractTime = contractTime;
	}

	public String getCertificate() {
		return certificate;
	}

	public void setCertificate(String certificate) {
		this.certificate = certificate;
	}

	public String getCertificateName() {
		return certificateName;
	}

	public void setCertificateName(String certificateName) {
		this.certificateName = certificateName;
	}

	public String getTownSecure() {
		return townSecure;
	}

	public void setTownSecure(String townSecure) {
		this.townSecure = townSecure;
	}

	public String getOtherSecure() {
		return otherSecure;
	}

	public void setOtherSecure(String otherSecure) {
		this.otherSecure = otherSecure;
	}

	public String getSafeCard() {
		return safeCard;
	}

	public void setSafeCard(String safeCard) {
		this.safeCard = safeCard;
	}

	public String getCardTime() {
		return cardTime;
	}

	public void setCardTime(String cardTime) {
		this.cardTime = cardTime;
	}

	public String getSafePosts() {
		return safePosts;
	}

	public void setSafePosts(String safePosts) {
		this.safePosts = safePosts;
	}

	public String getPostsTime() {
		return postsTime;
	}

	public void setPostsTime(String postsTime) {
		this.postsTime = postsTime;
	}

	public String getTrack() {
		return track;
	}

	public void setTrack(String track) {
		this.track = track;
	}

	public String getTrackTime() {
		return trackTime;
	}

	public String getEmpBuMenID() {
		return empBuMenID;
	}

	public void setEmpBuMenID(String empBuMenID) {
		this.empBuMenID = empBuMenID;
	}

	public void setTrackTime(String trackTime) {
		this.trackTime = trackTime;
	}

	public String getSafeOption() {
		return safeOption;
	}

	public void setSafeOption(String safeOption) {
		this.safeOption = safeOption;
	}

	public String getSafeOptionTime() {
		return safeOptionTime;
	}

	public void setSafeOptionTime(String safeOptionTime) {
		this.safeOptionTime = safeOptionTime;
	}

	public String getOrderBook() {
		return orderBook;
	}

	public void setOrderBook(String orderBook) {
		this.orderBook = orderBook;
	}

	public String getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(String orderTime) {
		this.orderTime = orderTime;
	}

	public String getBlood() {
		return blood;
	}

	public void setBlood(String blood) {
		this.blood = blood;
	}
	
	public String getPeccancys() {
		return peccancys;
	}

	public void setPeccancys(String peccancys) {
		this.peccancys = peccancys;
	}

	public Employee(){
			
		}
//	public Employee(Integer id, String eName, String eLableID, String eWorkID, String eSex, 
//		Department depart,BuMen bumen, WorkType wType, Duty duty, Title title, WorkTime minTime, Shifts shifts, WorkTime maxTime){
//		this.id = id;
//		this.empName = eName;
//		this.empLableID = eLableID;
//		this.empWorkID = eWorkID;
//		this.empSex = eSex;
//		this.depart = depart;
//		this.workType = wType;
//		this.duty = duty;
//		this.bumen=bumen;
//		this.title = title;
//		this.workTime = minTime;
//		this.shifts = shifts;
//		this.maxWorkTime = maxTime;
//	}
	public Employee(Integer id, String eName, String eLableID, String eWorkID, String eSex, 
			Department depart, WorkType wType,Title title,  Duty duty, WorkTime minTime, Shifts shifts,BuMen bumen, WorkTime maxTime){
			this.id = id;
			this.empName = eName;
			this.empLableID = eLableID;
			this.empWorkID = eWorkID;
			this.empSex = eSex;
			this.depart = depart;
			this.workType = wType;
			this.title = title;
			this.duty = duty;
			this.workTime = minTime;
			this.shifts = shifts;
			this.bumen=bumen;
			this.maxWorkTime = maxTime;
	}
	
	public Employee(Integer id, String empLabelID) {
		this.id = id;
		this.empLableID = empLabelID;
	}
	public Employee(Integer id, String eName, String eLableID, String unitName) {
		this.id = id;
		this.empName = eName;
		this.empLableID = eLableID;
		this.unitName = unitName;
	}

//	public Employee(Integer id, String eName, String eLableID, String eWorkID, Department depart){
//		this.id = id;
//		this.empName = eName;
//		this.depart = depart;
//	}
}
